<%@ page pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<%@ taglib uri="http://www.ld.com/shield/tags" prefix="shield"%>
<%@ taglib uri="http://www.ld.com/system/tags" prefix="system"%>
<%@ page trimDirectiveWhitespaces="true" %>
<fmt:setLocale value="zh_CN"/>
<%-- 权限判断 --%>
<shield:permssion type="button">
<table class="tab-list shield-table-odd">
	<col width="60">
	<col width="">
	<col width="">
	<col width="150">
	<col width="150">
	<col width="60">
	<col width="">
    <tr>
        <th class="w50 taCenter">序号</th>
	    <th>类型</th>
	    <th>接收账号</th>
	    <th>创建时间</th>
	    <th>修改时间</th>
	    <th>状态</th>
        <th class="operate_icon">操作</th>
    </tr>
<c:forEach var="model" items="${list }" varStatus="var">
    <tr>
        <td class="taCenter">${(pageBean.currentPage -1)*pageBean.pageSize+var.count }</td>
        
	   	<td title="${model.mediaTypeName }">${model.mediaTypeName }</td>
	   	<td title="${model.sendTo }">${model.sendTo }</td>
	   	<td >
			<fmt:formatDate value="${model.createTime }" pattern="yyyy-MM-dd HH:mm:ss"/>
		</td>
	   	<td >
			<fmt:formatDate value="${model.updateTime }" pattern="yyyy-MM-dd HH:mm:ss"/>
		</td>
		<td title=${model.state == 0?'启用':'停用' }">${model.state == 0?'启用':'停用' }</td>
        <td >
        	<!-- href改为data-url -->
            <a data-url="${ctxPathA }/usercenter/noticemedia/show" shieldParams="{'id':'${model.id }'}" class="shieldDialog shield-icon show" viewTitle="用户通知媒介详情" data-icon-title="查看用户通知媒介详情"
               viewWidth="800"></a>
            <a data-url="${ctxPathA }/usercenter/noticemedia/toAddOrUpdate" shieldParams="{'id':'${model.id }'}"  class="shieldDialog shield-icon update" viewTitle="修改用户通知媒介" data-icon-title="修改用户通知媒介"
               viewWidth="450"></a>
            <a data-url="${ctxPathA }/usercenter/noticemedia/toSendTest" shieldParams="{'id':'${model.id }'}"  class="shieldDialog " viewTitle="测试通知" title="测试通知" viewWidth="450">
            	<img src="${ctxPath }/images/icon/notice.png?20190829153139" class="c_p"></a>
	<c:if test="${model.state != 2 }">
		  	<a data-url="${ctxPathA }/usercenter/noticemedia/disable" shieldParams="{'id':'${model.id }'}" class="shieldAjax shield-icon disable" viewTitle="确定要停用该配置吗?"></a>
	</c:if>
	<c:if test="${model.state == 2 }">
		  	<a data-url="${ctxPathA }/usercenter/noticemedia/enable" shieldParams="{'id':'${model.id }'}" class="shieldAjax shield-icon enable" viewTitle="确定要启用该配置吗?"></a>
	</c:if>
            <a data-url="${ctxPathA }/usercenter/noticemedia/del" shieldParams="{'id':'${model.id }'}"  class="shieldAjax shield-icon del" viewTitle="确定要删除该条记录吗?"></a>
        </td>
    </tr>
</c:forEach>
<c:if test="${empty list }">
    <!-- 无数据时展示，有数据时展示上面的列表 -->
    <tr class="nodatatr_plugin">
        <td colspan="8" class="taCenter">暂无数据</td>
    </tr>
</c:if>
</table>
</shield:permssion>
